import java.util.Comparator;


public class SortBySalary implements Comparator<Data> {

	@Override
	public int compare(Data a, Data b) {
		double aData = Double.parseDouble(a.getAttribute(InformationGain.Salary));
		double bData = Double.parseDouble(b.getAttribute(InformationGain.Salary));
		if(aData<bData){
			return -1;
		} else if(aData>bData){
			return 1;
		} else return 0;
	}

}
